import{s as X}from"./DrFvzlh8agutd.js";var v={},L;function Y(){if(L)return v;L=1,v.__esModule=!0,v.parse=v.parseWithLocation=void 0;function D(s,l,f){return y(s,l,f)}v.parseWithLocation=D;function S(s){return y(s,null,null)}v.parse=S;function y(s,l,f){var p=s.length,i=0,x=1,k=0;p>0&&s.charCodeAt(0)===65279&&(i=1);function d(e){if(f===null)i=i+e;else for(;e>0;){var a=s.charCodeAt(i);a===10?(i++,x++,k=0):(i++,k++),e--}}function A(e){f===null?i=e:d(e-i)}function C(){for(;i<p;){var e=s.charCodeAt(i);if(e!==32&&e!==9&&e!==13&&e!==10)break;d(1)}}function w(e){return s.substr(i,e.length)===e?(d(e.length),!0):!1}function h(e){var a=s.indexOf(e,i);A(a!==-1?a+e.length:p)}function _(e){var a=s.indexOf(e,i);if(a!==-1){var g=s.substring(i,a);return A(a+e.length),g}else{var g=s.substr(i);return A(p),g}}var t=0,n=null,b=[],I=[],r=null;function m(e,a){b.push(t),I.push(n),t=e,n=a}function W(){if(b.length===0)return u("illegal state stack");t=b.pop(),n=I.pop()}function u(e){throw new Error("Near offset "+i+": "+e+" ~~~"+s.substr(i,50)+"~~~")}var q={enterDict:function(){if(r===null)return u("missing <key>");var e={};f!==null&&(e[f]={filename:l,line:x,char:k}),n[r]=e,r=null,m(1,e)},enterArray:function(){if(r===null)return u("missing <key>");var e=[];n[r]=e,r=null,m(2,e)}},M={enterDict:function(){var e={};f!==null&&(e[f]={filename:l,line:x,char:k}),n.push(e),m(1,e)},enterArray:function(){var e=[];n.push(e),m(2,e)}};function R(){t===1?q.enterDict():t===2?M.enterDict():(n={},f!==null&&(n[f]={filename:l,line:x,char:k}),m(1,n))}function P(){if(t===1)W();else return u("unexpected </dict>")}function T(){t===1?q.enterArray():t===2?M.enterArray():(n=[],m(2,n))}function j(){if(t===1)return u("unexpected </array>");if(t===2)W();else return u("unexpected </array>")}function B(e){if(t===1){if(r!==null)return u("too many <key>");r=e}else return u("unexpected <key>")}function U(e){if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function V(e){if(isNaN(e))return u("cannot parse float");if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function F(e){if(isNaN(e))return u("cannot parse integer");if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function z(e){if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function G(e){if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function E(e){if(t===1){if(r===null)return u("missing <key>");n[r]=e,r=null}else t===2?n.push(e):n=e}function H(e){return e.replace(/&#([0-9]+);/g,function(a,g){return String.fromCodePoint(parseInt(g,10))}).replace(/&#x([0-9a-f]+);/g,function(a,g){return String.fromCodePoint(parseInt(g,16))}).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,function(a){switch(a){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return a})}function J(){var e=_(">"),a=!1;return e.charCodeAt(e.length-1)===47&&(a=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:a}}function o(e){if(e.isClosed)return"";var a=_("</");return h(">"),H(a)}for(;i<p&&(C(),!(i>=p));){var Q=s.charCodeAt(i);if(d(1),Q!==60)return u("expected <");if(i>=p)return u("unexpected end of input");var O=s.charCodeAt(i);if(O===63){d(1),h("?>");continue}if(O===33){if(d(1),w("--")){h("-->");continue}h(">");continue}if(O===47){if(d(1),C(),w("plist")){h(">");continue}if(w("dict")){h(">"),P();continue}if(w("array")){h(">"),j();continue}return u("unexpected closed tag")}var c=J();switch(c.name){case"dict":R(),c.isClosed&&P();continue;case"array":T(),c.isClosed&&j();continue;case"key":B(o(c));continue;case"string":U(o(c));continue;case"real":V(parseFloat(o(c)));continue;case"integer":F(parseInt(o(c),10));continue;case"date":z(new Date(o(c)));continue;case"data":G(o(c));continue;case"true":o(c),E(!0);continue;case"false":o(c),E(!1);continue}if(!/^plist/.test(c.name))return u("unexpected opened tag "+c.name)}return n}return v}var $=Y();function N(D,S){const y={};for(const s of Object.values(X.workspace?.items||{})){const l=s[S];s._type===D&&l!=null&&Object.keys(l).forEach(f=>y[f]=s._id)}return y}export{N as g,$ as m};